#ifndef SEATSHOW_H
#define SEATSHOW_H

#include <QWidget>
#include "reservehome.h"
#include"qpushbutton.h"
#include"seatselect.h"
namespace Ui {
class seatshow;
}

class seatshow : public QWidget
{
    Q_OBJECT

public:
    explicit seatshow(QWidget *parent = nullptr);
    ~seatshow();
    void showImage(QString imagePath);

private slots:
    void on_pushButton_clicked();

private:
    Ui::seatshow *ui;
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void paintEvent(QPaintEvent *event);
    void showSeat(area& seats);
    QList<QPushButton*> seatButtons;
    void onSeatClicked(int index,QPushButton* button);
    QPoint initialMousePosition;
    bool isDragging = false;
    int seatRadius=30;
    int tableRadius=80;
public:
    static seatSelect *s;
};

#endif // SEATSHOW_H
